#pragma once

#include "LandMap_common.h"

using namespace boost;

class LandMap : public LayerPlugin
{
public:
	LandMap(void);
	~LandMap(void);

	bool	initPlugin();

private:
	void					load_China();
	void					load_ProvincialAreas();
	void					load_ProvincialBoundaries();
	void					load_ProvincialCapitals();
	void					load_ProvincialNames();
	void					load_CityBoundaries();
	void					load_CityNames();
	void					load_NationalRoad();
	void load_ProvincialRoad();
	void					load_Railway();


	void					loadEarthFile(filesystem::path& earthPath, filesystem::path& ivePath, Group* geomGroup, Group* labelGroup);
	Label*					constructText(Node* node, unsigned short size, string alignMode, int prefix);
	TextBase::AlignmentType	translateAlignMode(string alignModeStr);
	string					translatePrefix(int prefix);
	int						isGeomNodeOrTextNode(Geode* node);
	void					changeColor(Node* node, float r, float g, float b);

	void					findAllGeodes(Node* node, vector<Geode*>& geodeList);
	void					changeColorForOneGeode(Geode* geode, float r, float g, float b);
};

EXPORT_PLUGIN_FUNCTION
{
	return new LandMap;
};
